
          var fs = require('fs');
          var path = require('path');
	function travel(dir, callback) {
	    fs.readdirSync(dir).forEach(function (file) {
	        var pathname = path.join(dir, file);

	        if (fs.statSync(pathname).isDirectory()) {
	            travel(pathname, callback);
	        } else {
	            callback(pathname);
	        }
	    });
	}

	travel('G:/project/learn/0323/nodejs/遍历目录/',function(pathname){
		console.log(pathname);
	});